/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    FangYongliang
 * 创建时间:    2023-11-27
 */
package org.jeecg.modules.dock.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.business.outbound.service.IWmsOutReceiptTaskService;
import org.jeecg.modules.business.warehouse.entity.InspectResultVO;
import org.jeecg.modules.business.warehouse.service.IWmsInReceiptTaskService;
import org.jeecg.modules.dock.aspect.DockLog;
import org.jeecg.modules.dock.constant.SystemConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * //TODO 【请填写类描述】
 *
 * @author FangYongliang
 * @version 1.0.0
 * @since 2023-11-27
 */
@AllArgsConstructor
@RestController
@Slf4j
@RequestMapping("/dock/qms")
@Api(tags = "qms调用controller")
@DockLog(source = "QMS")
public class QmsDockingController {

    @Autowired
    private IWmsOutReceiptTaskService wmsOutReceiptTaskService;

    @Autowired
    private IWmsInReceiptTaskService wmsInReceiptTaskService;

    /**
     * 出库质检
     *
     * @author FangYongliang
     * @since 2023/11/24 9:44:20
     * @param inspectResultVO
     * @return org.jeecg.common.api.vo.Result<?>
     */
    @PostMapping("out/inspect")
    public Result<?> outboundInspect(@RequestBody InspectResultVO inspectResultVO){
        wmsOutReceiptTaskService.outboundInspect(inspectResultVO);
        return Result.OK();

    }

    /**
     * 原料、辅材质检结果
     *
     *
     * @return
     */
    @ApiOperation(value = "原料、辅材质检结果", notes = "原料、辅材质检结果")
    @PostMapping("in/inspect")
    public Result<?> rawOrAuxInspect(@RequestBody InspectResultVO inspectResultVO){
        wmsInReceiptTaskService.rawOrAuxInspect(inspectResultVO);
        return Result.ok();
    }

}
